Skip to content

Riot csv adapted from Stuart#35

Closed
jessecusack wants to merge 5 commits intomainfrom
riot_csv
Closed

Riot csv adapted from Stuart#35
jessecusack wants to merge 5 commits intomainfrom
riot_csv

Conversation

@jessecusack
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds RIOT CSV export functionality to the glide pipeline, allowing L2 processing to optionally output a $riotData-style CSV file with ping data and interpolated positions.

Changes:

  • New riot_csv_writer.py module that converts an xarray Dataset into a RIOT-compatible CSV format with optional position interpolation
  • New CLI options --riot-csv and --riot-positions on the l2 command to trigger RIOT CSV output
  • .gitignore update for PyCharm project files

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/glide/riot_csv_writer.py New module implementing RIOT CSV export with position interpolation
src/glide/cli.py Adds --riot-csv and --riot-positions CLI options to l2 command
.gitignore Adds PyCharm .idea ignore pattern

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

# Write to CSV
_log.debug("Writing to RIOT CSV")
riot_df.to_csv(
output_path, index=False, header=False, lineterminator="\n", mode="a"
Comment thread src/glide/cli.py Outdated
"slot": slot,
"group": group,
"state": platform_state,
"num_records": np.full(len(epoch_msecs), np.nan),
Comment on lines +60 to +68
position_vars = ["depth", "lat", "lon", "time"]

# Check that all required RIOT variables are present in the dataset
if not set(riot_vars).issubset(set(ds.data_vars)):
_log.error("Dataset is missing required RIOT variables")
return

# Optionally add position variables if they are present in the dataset
if add_positions and not set(position_vars).issubset(ds.variables):
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jessecusack
Copy link
Copy Markdown
Contributor Author

Superceded.

@jessecusack jessecusack deleted the riot_csv branch March 16, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants